export default (msg) => {
	try {
		// 处理警告消息
		window.fante.log(msg)
		let msgObject = JSON.parse(msg)
		let {
			alarmId,
			captureId,
			alarmTypeId
		} = msgObject

		if (alarmTypeId === 1001) {
			// 车辆
			uni.navigateTo({
				url: `/pages/warning/components/vehicle?alarmId=${alarmId}&captureId=${captureId}`
			})
		} else if (alarmTypeId === 1002) {
			// 黑名单
			uni.navigateTo({
				url: '/pages/warning/components/blackList?alarmId=' + alarmId
			})
		} else if (alarmTypeId === 1003) {
			// 陌生人
			uni.navigateTo({
				url: `/pages/warning/components/stranger?alarmId=${alarmId}&captureId=${captureId}`
			})
		}
	} catch (ex) {
		// fante.log(ex)
		uni.showToast({
			title: ex.toString()
		})
	}
}
